package com.esl.dto.admin;

import com.esl.model.admin.User;

public class User_Dto {
	private String studentNO;
	private String authcode;
	private String password;
	private String name;
	private String email;
	private int id;
	private String password_a;
	private String password_b;

	public boolean passwordEqual(String passwordOfUser) {
		if (password_a.equals(password_b) && passwordOfUser.equals(password_a))
			return true;
		else
			return false;
	}
	
	// User_Dto转换成User对象
	public User toUser() {
		return new User(password,email,studentNO);
	}
/*-----------------------------------------*/
	
	public User_Dto() {
		super();
		
	}

	public User_Dto(int id) {
		super();
		this.id = id;
	}

	public User_Dto(String studentNO, String password, String name, int id) {
		super();
		this.studentNO = studentNO;
		this.password = password;
		this.name = name;
		this.id = id;
	}

	/*-----------------------------------------*/

	public String getAuthcode() {
		return authcode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStudentNO() {
		return studentNO;
	}

	public void setStudentNO(String studentNO) {
		this.studentNO = studentNO;
	}

	public void setAuthcode(String authcode) {
		this.authcode = authcode;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPassword_a() {
		return password_a;
	}

	public void setPassword_a(String password_a) {
		this.password_a = password_a;
	}

	public String getPassword_b() {
		return password_b;
	}

	public void setPassword_b(String password_b) {
		this.password_b = password_b;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

}